from tkinter import *

X = int(input())
Y = int(input())
N = int(input())


if N == 0 and X>=0 and X<=500 and Y>=0 and Y<=500:
    pass
else:
    if N > 0 and 0*N+X>=0 and 0*N+Y>=0 and 20*N+X<=500 and 20*N+Y<=500:
        pass
    else:
        if N < 0 and 20*N+X>=0 and 20*N+Y>=0 and 0*N+X<=500 and 0*N+Y<=500:
            pass
        else:
            print('Размер фигуры превышает максимальный размер поля')
            exit()

root = Tk()
root.title("ИТ марафон")
root.geometry("500x500")

canvas = Canvas(bg="white", width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)

x1, y1=0*N+X, 0*N+Y
x2, y2=10*N+X, 0*N+Y
x3, y3=10*N+X, 10*N+Y
x4, y4=20*N+X, 10*N+Y
x5, y5=20*N+X, 20*N+Y
x6, y6=10*N+X, 20*N+Y
x7, y7=10*N+X, 30*N+Y
x8, y8=0*N+X, 30*N+Y
canvas.create_polygon(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6,x7,y7,x8,y8)

root.mainloop()